package com.ruoyi.finance.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 财务明细对象 erp_finance_item
 * 
 * @author ruoyi
 * @date 2025-04-07
 */
public class ErpFinanceItem extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Integer id;

    /** 财务明细编号 */
    @Excel(name = "财务明细编号")
    private String sn;

    /** 来源 */
    @Excel(name = "来源")
    private String sourceType;

    /** 来源编号 */
    @Excel(name = "来源编号")
    private String sourceSn;

    /** 金额 */
    @Excel(name = "金额")
    private BigDecimal amount;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createTime;

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /** 收入/支出 */
    @Excel(name = "收入/支出")
    private String amountType;

    /** 创建者 */
    @Excel(name = "创建者")
    private String creator;

    /** 更新者 */
    @Excel(name = "更新者")
    private String updater;

    public void setId(Integer id) 
    {
        this.id = id;
    }

    public Integer getId() 
    {
        return id;
    }
    public void setSn(String sn) 
    {
        this.sn = sn;
    }

    public String getSn() 
    {
        return sn;
    }
    public void setSourceType(String sourceType) 
    {
        this.sourceType = sourceType;
    }

    public String getSourceType() 
    {
        return sourceType;
    }
    public void setSourceSn(String sourceSn) 
    {
        this.sourceSn = sourceSn;
    }

    public String getSourceSn() 
    {
        return sourceSn;
    }
    public void setAmount(BigDecimal amount) 
    {
        this.amount = amount;
    }

    public BigDecimal getAmount() 
    {
        return amount;
    }
    public void setAmountType(String amountType) 
    {
        this.amountType = amountType;
    }

    public String getAmountType() 
    {
        return amountType;
    }
    public void setCreator(String creator) 
    {
        this.creator = creator;
    }

    public String getCreator() 
    {
        return creator;
    }
    public void setUpdater(String updater) 
    {
        this.updater = updater;
    }

    public String getUpdater() 
    {
        return updater;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("sn", getSn())
            .append("sourceType", getSourceType())
            .append("sourceSn", getSourceSn())
            .append("amount", getAmount())
            .append("amountType", getAmountType())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("creator", getCreator())
            .append("updater", getUpdater())
            .append("createTime", getCreateTime())
            .toString();
    }
}
